package cn.ac.cintcm.dataconverge.researcher.service.impl;

import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;

import cn.ac.cintcm.dataconverge.dao.IBaseDao;
import cn.ac.cintcm.dataconverge.researcher.dao.IDictDao;
import cn.ac.cintcm.dataconverge.researcher.domain.SystemDict;
import cn.ac.cintcm.dataconverge.researcher.service.IDictService;

import com.hs.core.page.PageParam;
import com.hs.core.page.PageUtil;
import com.hs.core.service.BaseSevice;

public class DictService extends BaseSevice implements IDictService{
	private IDictDao dictDao;

	public IDictDao getDictDao() {
		return dictDao;
	}

	public void setDictDao(IDictDao dictDao) {
		this.dictDao = dictDao;
		 
	}

	public List getFiletypelist() {
		// TODO Auto-generated method stub
		 
		return dictDao.getFiletypeList();
	}
	
	public SystemDict getDictById(Long id){
		return dictDao.getDictById(id);
	}

	public void saveFiletype(SystemDict dict) {
		// TODO Auto-generated method stub
		dictDao.save(dict);
	}

	public void updateFiletype(SystemDict dict) {
		// TODO Auto-generated method stub
		dictDao.update(dict);
	}

	public void deleteFiletype(Long id) {
		// TODO Auto-generated method stub
		SystemDict dict=dictDao.getDictById(id);
		if(null != dict)
			dictDao.delete(dict);
		
	}

	@Override
	public IBaseDao getBaseDao() {
		// TODO Auto-generated method stub
		return dictDao;
	}

	public PageUtil getFiletypelistPage(PageParam pageParam) {
		// TODO Auto-generated method stub
		return this.dictDao.getFiletypelistPage(pageParam);
	}
	public List getDictList(String dictType){
		return this.dictDao.getDictList(dictType);
	}


}
